//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

package org.ryzom.nel.misc;

public class CImposterLog {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CImposterLog(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CImposterLog obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_CImposterLog(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CLog __deref__() {
    long cPtr = nelmiscJNI.CImposterLog___deref__(swigCPtr, this);
    return (cPtr == 0) ? null : new CLog(cPtr, false);
  }

  public CLog access() {
    return new CLog(nelmiscJNI.CImposterLog_access(swigCPtr, this), false);
  }

  public void addDisplayer(IDisplayer displayer, boolean bypassFilter) {
    nelmiscJNI.CImposterLog_addDisplayer__SWIG_0(swigCPtr, this, IDisplayer.getCPtr(displayer), displayer, bypassFilter);
  }

  public void addDisplayer(IDisplayer displayer) {
    nelmiscJNI.CImposterLog_addDisplayer__SWIG_1(swigCPtr, this, IDisplayer.getCPtr(displayer), displayer);
  }

  public IDisplayer getDisplayer(String displayerName) {
    long cPtr = nelmiscJNI.CImposterLog_getDisplayer(swigCPtr, this, displayerName);
    return (cPtr == 0) ? null : new IDisplayer(cPtr, false);
  }

  public void removeDisplayer(IDisplayer displayer) {
    nelmiscJNI.CImposterLog_removeDisplayer__SWIG_0(swigCPtr, this, IDisplayer.getCPtr(displayer), displayer);
  }

  public void removeDisplayer(String displayerName) {
    nelmiscJNI.CImposterLog_removeDisplayer__SWIG_1(swigCPtr, this, displayerName);
  }

  public boolean attached(IDisplayer displayer) {
    return nelmiscJNI.CImposterLog_attached(swigCPtr, this, IDisplayer.getCPtr(displayer), displayer);
  }

  public boolean noDisplayer() {
    return nelmiscJNI.CImposterLog_noDisplayer(swigCPtr, this);
  }

  public void setProcessName(String processName) {
    nelmiscJNI.CImposterLog_setProcessName(swigCPtr, this, processName);
  }

  public void setDefaultProcessName() {
    nelmiscJNI.CImposterLog_setDefaultProcessName(swigCPtr, this);
  }

  public void setPosition(int line, String fileName, String funcName) {
    nelmiscJNI.CImposterLog_setPosition__SWIG_0(swigCPtr, this, line, fileName, funcName);
  }

  public void setPosition(int line, String fileName) {
    nelmiscJNI.CImposterLog_setPosition__SWIG_1(swigCPtr, this, line, fileName);
  }

  public void displayNL(String format) {
    nelmiscJNI.CImposterLog_displayNL(swigCPtr, this, format);
  }

  public void display(String format) {
    nelmiscJNI.CImposterLog_display(swigCPtr, this, format);
  }

  public void displayRawNL(String format) {
    nelmiscJNI.CImposterLog_displayRawNL(swigCPtr, this, format);
  }

  public void displayRaw(String format) {
    nelmiscJNI.CImposterLog_displayRaw(swigCPtr, this, format);
  }

  public void forceDisplayRaw(String format) {
    nelmiscJNI.CImposterLog_forceDisplayRaw(swigCPtr, this, format);
  }

  public void addPositiveFilter(String filterstr) {
    nelmiscJNI.CImposterLog_addPositiveFilter(swigCPtr, this, filterstr);
  }

  public void addNegativeFilter(String filterstr) {
    nelmiscJNI.CImposterLog_addNegativeFilter(swigCPtr, this, filterstr);
  }

  public void resetFilters() {
    nelmiscJNI.CImposterLog_resetFilters(swigCPtr, this);
  }

  public void removeFilter(String filterstr) {
    nelmiscJNI.CImposterLog_removeFilter__SWIG_0(swigCPtr, this, filterstr);
  }

  public void removeFilter() {
    nelmiscJNI.CImposterLog_removeFilter__SWIG_1(swigCPtr, this);
  }

  public void displayFilter(CLog log) {
    nelmiscJNI.CImposterLog_displayFilter(swigCPtr, this, CLog.getCPtr(log), log);
  }

  public void releaseProcessName() {
    nelmiscJNI.CImposterLog_releaseProcessName(swigCPtr, this);
  }

}
